% This is made by thinking that Lognormal Channel is also an LTI system

clear all;
close all;
clc;

data = randi(1,1000);

% Taking the frequency response
fft_data = fft(data, 100);

% Passing the values through the lognormal PDF
y = lognpdf(fft_data,0,1);

% Taking the inverse frequency response
rec = ifft(y,1000);

% Multiplied by 10 for no reason - Jugaad
z = 10*logninv(abs(rec),0,1);
% plot(abs(fft_data))
% hold on
% plot(abs(y),'r')
% hold on
% plot(abs(z),'b')

% To convert decimal values into integer ones
z = round(z);
%z

[Num1,Rat1] = biterr(data,z)